package ne.aishuyuan.video.utils;
import oshi.SystemInfo;
import oshi.hardware.HardwareAbstractionLayer;

/**
 * @ClassName: DeviceInfoUtil
 * @Description: 获取设备信息
 * @Author: clj
 * @Date: 2021/11/3 10:26
 */
public class DeviceInfoUtil {
    public static String getSerialNumber() {
        SystemInfo si = new SystemInfo();
        HardwareAbstractionLayer hal = si.getHardware();
        return hal.getComputerSystem().getBaseboard().getSerialNumber();
    }

    public static String getHardwareUUID() {
        SystemInfo si = new SystemInfo();
        HardwareAbstractionLayer hal = si.getHardware();
        return hal.getComputerSystem().getHardwareUUID();
    }
    public static String getProcessorID() {
        SystemInfo si = new SystemInfo();
        HardwareAbstractionLayer hal = si.getHardware();
        return hal.getProcessor().getProcessorIdentifier().getProcessorID();
    }
}
